package com.example.ymm.modules1.service.user;

import com.alibaba.fastjson.JSONObject;
import com.example.ymm.base.BaseService;
import com.example.ymm.model.CommonResult;
import com.example.ymm.model.TableList;
import com.example.ymm.model.YmPageDto;
import com.example.ymm.modules1.entity.my.user.DbUser;
import com.example.ymm.modules1.service.dto.DbUserQueryCriteria;
import com.example.ymm.modules1.service.dto.ImportUserExcelDto;

import javax.servlet.http.HttpSession;
import java.util.List;

public interface DbUserService extends BaseService<DbUser> {

    TableList<DbUser> list(DbUserQueryCriteria criteria, YmPageDto ymPage);

    //用户时长统计列表
    TableList<DbUser> countList(DbUserQueryCriteria criteria, YmPageDto ymPage);


    List<DbUser> queryAll(DbUserQueryCriteria criteria);

    DbUser findByUserId(String userId);

    DbUser addUser(JSONObject json);


    DbUser editUser(DbUser user);


    DbUser findByUserName(String userName);


    void importExcel(ImportUserExcelDto dto);


    CommonResult login(String code);

    CommonResult login2(String code);

    CommonResult loginH5(String code);

    CommonResult loginByUserId(String userId);


    /**
     * 考试系统登录
     * @param userName
     * @return
     */
    CommonResult loginByEx(String userName, HttpSession session);

    /**
     * 同步离职人员信息
     */
    void sycnDimissionUserList();



}
